package cn.micro.keep.accounts.exception;



import cn.micro.keep.accounts.api.IErrorCode;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class MicroSysException extends RuntimeException{

    private Integer code = 500;

    private String message;

    public MicroSysException(String message){
        this.message = message;
    }

    public MicroSysException(IErrorCode errorCode){
        this.code = errorCode.getCode();
        this.message = errorCode.getMessage();
    }


}
